<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html >
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>晒羊毛-撸羊毛有风险，投资需谨慎</title>
	<link rel="stylesheet" type="text/css" href="<%=path%>/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="<%=path%>/css/style.min.css">
	<link rel="stylesheet" type="text/css" href="<%=path%>/css/sym.css">
	<script type="text/javascript" src="<%=path%>/js/jquery.min.js"></script>
	<script type="text/javascript" src="<%=path%>/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="<%=path%>/js/layer/layer.js"></script>
	<script type="text/javascript" src="<%=path%>/js/common.js"></script>
<body class="gray-bg">
<jsp:include page="/views/commons/header.jsp"></jsp:include>
<div class="signin">
    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-7">
            </div>
            <div class="col-sm-5">
                <form method="post" action="">
                    <h4 class="no-margins">登录</h4>
                    <p class="m-t-md">欢迎您登录到晒羊毛</p>
                    <input type="text"  name="userAccount" id="user_account" class="form-control uname" placeholder="用户名" />
                    <input type="password" name="userPassword"  id="password"  class="form-control pword m-b" placeholder="密码" />
            
                    <input type="button" class="btn btn-success btn-block"  id="loginbtn" value="登录" onclick="javascript:doLogin()"/>
                    <div class="mt10">还没有账号？ <a href="<%=path%>/uncheck/register">立即注册»</a>
                	<a href="<%=path%>/uncheck/findPassword/firstStep" class="pull-right c_666">忘记密码?</a></div>
                </form>
            </div>
        </div>
    </div>
</div> 
<jsp:include page="/views/commons/footer.jsp"></jsp:include>
</body>
<script type="text/javascript">
function doLogin(){
	$("#loginbtn").addClass("disabled").attr("disabled","disabled").val("登录中");
	var redirectUrl="${redirectUrl}";
	$.ajax({
		url : path + "/uncheck/doLogin",
		type : "post",
		dataType : "json",
		data : {
			userAccount : $("#user_account").val(),
			userPassword : $("#password").val()
		},
		success : function(data)
		{
			if(data.result)
			{
				if(redirectUrl != ''){
					window.location.href = redirectUrl;
				}else{
					window.location.href = path + "/views/index.jsp";
				}
			}
			else
			{
				layer.msg(data.msg,{icon: 2});
				$("#loginbtn").removeClass("disabled").removeAttr("disabled").val("登录");
			}
		},error:function(){
			layer.msg("服务器网络繁忙",{icon: 2});
			$("#loginbtn").removeClass("disabled").removeAttr("disabled").val("登录");
		}
	});
}
</script>
</html>